Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1091 Reduce Avatica RPC latency umbrella
  3. CALCITE-1094

Replace AvaticaUtils.readFully(InputStream)'s use of ByteArrayOutputStream

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • avatica-1.7.0
    • avatica
    • None

    Description

      I remember reading a ticket a long time ago (ACCUMULO-1000) about how use of ByteArrayOutputStream can be sub-optimal for low-latency calls due to the synchronization around the write method.

      While ByteArrayOutputStream gets the job done, an unsynchronized buffer is sufficient for reading the bytes of the HTTP body off of the wire and into a byte array. We don't need the synchronization guarantees that come with BAOS.

      Attachments

        Activity

          People

            elserj Josh Elser
            elserj Josh Elser
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: